from manim import *

class PrimeNumber(Scene):
    def construct(self):
        title = Text("What are Prime Numbers?", font_size=40).to_edge(UP)
        self.play(Write(title))

        prime_numbers = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]  # Some prime numbers
        primes_text = Text("Prime Numbers:", font_size=30).next_to(title, DOWN)
        self.play(Write(primes_text))

        prime_number_group = VGroup()
        for num in prime_numbers:
            prime_text = Text(f"{num}", font_size=30)
            prime_number_group.add(prime_text)
        
        prime_number_group.arrange_submobjects(RIGHT, buff=0.5)
        prime_number_group.next_to(primes_text, DOWN)
        self.play(Write(prime_number_group))

        explanation = Text("A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself.", font_size=25).scale(0.8).next_to(prime_number_group, DOWN, buff=1.5)
        self.play(Write(explanation))
        
        self.wait(3)
